import hashlib 
import io

def gen_checksum(file_path):
  m = hashlib.sha256()  

  file = io.FileIO(file_path, 'r')  
  bytes = file.read(1024)  

  while(bytes != b''):  
    m.update(bytes)  
    bytes = file.read(1024)   
  file.close()  

  return m.hexdigest()  

def gen_checksums(file_paths):
  m = hashlib.sha256()  

  for file_path in file_paths:
    file = io.FileIO(file_path, 'r')  
    bytes = file.read(1024)  

    while(bytes != b''):  
      m.update(bytes)  
      bytes = file.read(1024)   
      
    file.close()  

  return m.hexdigest() 